home *** CD-ROM | disk | FTP | other *** search
/ Remax Data / Remax Porfolio Data 15 Jul 1994 CD-ROM.ISO / fp26_rmx / control.spr < prev    next >
Encoding:
Text File  |  1994-07-09  |  9.0 KB  |  267 lines

  1. *       *********************************************************
  2. *       *                                                         
  3. *       * 06/20/94             CONTROL.SPR               10:48:22 
  4. *       *                                                         
  5. *       *********************************************************
  6. *       *                                                         
  7. *       * Author's Name                                           
  8. *       *                                                         
  9. *       * Copyright (c) 1994 Company Name                         
  10. *       * Address                                                 
  11. *       * City,     Zip                                           
  12. *       *                                                         
  13. *       * Description:                                            
  14. *       * This program was automatically generated by GENSCRN.    
  15. *       *                                                         
  16. *       *********************************************************
  17.  
  18.  
  19. #REGION 0
  20. REGIONAL m.currarea, m.talkstat, m.compstat
  21.  
  22. IF SET("TALK") = "ON"
  23.     SET TALK OFF
  24.     m.talkstat = "ON"
  25. ELSE
  26.     m.talkstat = "OFF"
  27. ENDIF
  28. m.compstat = SET("COMPATIBLE")
  29. SET COMPATIBLE FOXPLUS
  30.  
  31. m.rborder = SET("READBORDER")
  32. SET READBORDER ON
  33.  
  34. m.currarea = SELECT()
  35.  
  36.  
  37. *       *********************************************************
  38. *       *                                                         
  39. *       *               Windows Window definitions                
  40. *       *                                                         
  41. *       *********************************************************
  42. *
  43.  
  44. IF NOT WEXIST("controls") ;
  45.     OR UPPER(WTITLE("CONTROLS")) == "CONTROLS.PJX" ;
  46.     OR UPPER(WTITLE("CONTROLS")) == "CONTROLS.SCX" ;
  47.     OR UPPER(WTITLE("CONTROLS")) == "CONTROLS.MNX" ;
  48.     OR UPPER(WTITLE("CONTROLS")) == "CONTROLS.PRG" ;
  49.     OR UPPER(WTITLE("CONTROLS")) == "CONTROLS.FRX" ;
  50.     OR UPPER(WTITLE("CONTROLS")) == "CONTROLS.QPR"
  51.     DEFINE WINDOW controls ;
  52.         AT 5.417, 66.750 ;
  53.         SIZE 17.385,8.333 ;
  54.         FONT "MS Sans Serif", 8 ;
  55.         STYLE "B" ;
  56.         FLOAT ;
  57.         NOCLOSE ;
  58.         NOMINIMIZE ;
  59.         HALFHEIGHT ;
  60.         COLOR RGB(,,,192,192,192)
  61. ENDIF
  62.  
  63.  
  64. *       *********************************************************
  65. *       *                                                         
  66. *       *         CONTROL/Windows Setup Code - SECTION 2          
  67. *       *                                                         
  68. *       *********************************************************
  69. *
  70.  
  71. #REGION 1
  72. *#SECTION 1
  73. *
  74. * Screen description:
  75. * This screen is a UTILITY screen.  It may be combined with any other
  76. * screens.  All variables used by this screen have been declared REGIONAL to
  77. * encapsulate them (i.e., to avoid conflict with variables from other
  78. * screens).  All variables also have 'm.' prefix to avoid conflict with
  79. * 'unknown' database field names.
  80. *
  81. * Points of interest:
  82. * This screen has been designed to dim its buttons when they
  83. * are not appropritate (i.e., when at TOP dim < Top >, etc.)
  84. * Since TOP and BOTTOM operate within a given scope, if you wish to use this
  85. * screen in presence of any FILTERING (scope altering) conditions make sure
  86. * the control utility screen follows the other screen when you combine them.
  87. *
  88.  
  89. *#SECTION 2
  90. *REGIONAL m.choice, m.toprec, m.bottomrec, m.saverecno
  91. *PRIVATE m.quitting
  92. *m.quitting = .F.
  93. *m.choice = 6
  94.  
  95. *IF EOF()
  96. *    GO BOTTOM
  97. *ENDIF
  98.  
  99. *m.saverecno = RECNO()
  100. *GO TOP
  101. *m.toprec = RECNO()
  102. *GO BOTTOM
  103. *m.bottomrec = RECNO()
  104. *GO m.saverecno
  105.  
  106.  
  107.  
  108. *       *********************************************************
  109. *       *                                                         
  110. *       *              CONTROL/Windows Screen Layout              
  111. *       *                                                         
  112. *       *********************************************************
  113. *
  114.  
  115. #REGION 1
  116. IF WVISIBLE("controls")
  117.     ACTIVATE WINDOW controls SAME
  118. ELSE
  119.     ACTIVATE WINDOW controls NOSHOW
  120. ENDIF
  121. @ 0.615,1.167 GET m.choice ;
  122.     PICTURE "@*BVN " + ;
  123.         (LOCFILE("sample\organize\bmps\top.bmp","BMP|ICO|PCT|ICN","Where is top?")) + ";" + ;
  124.         (LOCFILE("sample\organize\bmps\prior.bmp","BMP|ICO|PCT|ICN","Where is prior?")) + ";" + ;
  125.         (LOCFILE("sample\organize\bmps\next.bmp","BMP|ICO|PCT|ICN","Where is next?")) + ";" + ;
  126.         (LOCFILE("sample\organize\bmps\bottom.bmp","BMP|ICO|PCT|ICN","Where is bottom?")) ;
  127.     SIZE 2.462,5.833,0.000 ;
  128.     DEFAULT 1 ;
  129.     FONT "MS Sans Serif", 8 ;
  130.     STYLE "B" ;
  131.     VALID _qr10n5w4h()
  132. @ 11.154,1.167 GET m.lchoice ;
  133.     PICTURE "@*BHN " + ;
  134.         (LOCFILE("sample\organize\bmps\locate.bmp","BMP|ICO|PCT|ICN","Where is locate?")) ;
  135.     SIZE 2.462,5.833,0.667 ;
  136.     DEFAULT 1 ;
  137.     FONT "MS Sans Serif", 8 ;
  138.     STYLE "B" ;
  139.     VALID _qr10n5wgi()
  140. @ 14.231,1.167 GET m.echoice ;
  141.     PICTURE "@*HN Exit" ;
  142.     SIZE 2.462,5.833,0.667 ;
  143.     DEFAULT 1 ;
  144.     FONT "MS Sans Serif", 8 ;
  145.     STYLE "B" ;
  146.     VALID _qr10n5wki()
  147.  
  148. IF NOT WVISIBLE("controls")
  149.     ACTIVATE WINDOW controls
  150. ENDIF
  151.  
  152. READ CYCLE
  153.  
  154. RELEASE WINDOW controls
  155. SELECT (m.currarea)
  156.  
  157.  
  158. #REGION 0
  159.  
  160. SET READBORDER &rborder
  161.  
  162. IF m.talkstat = "ON"
  163.     SET TALK ON
  164. ENDIF
  165. IF m.compstat = "ON"
  166.     SET COMPATIBLE ON
  167. ENDIF
  168.  
  169.  
  170. *       *********************************************************
  171. *       *                                                         
  172. *       * _QR10N5W4H           m.choice VALID                     
  173. *       *                                                         
  174. *       * Function Origin:                                        
  175. *       *                                                         
  176. *       * From Platform:       Windows                            
  177. *       * From Screen:         CONTROL,     Record Number:    2   
  178. *       * Variable:            m.choice                           
  179. *       * Called By:           VALID Clause                       
  180. *       * Object Type:         Push Button                        
  181. *       * Snippet Number:      1                                  
  182. *       *                                                         
  183. *       *********************************************************
  184. *
  185. FUNCTION _qr10n5w4h     &&  m.choice VALID
  186. #REGION 1
  187. DO CASE
  188. CASE m.choice = 1
  189.     GO TOP    
  190.     SHOW GET m.choice, 3 ENABLE
  191.     SHOW GET m.choice, 1 DISABLE
  192.     SHOW GET m.choice, 2 DISABLE
  193.     SHOW GET m.choice, 4 ENABLE
  194. CASE m.choice = 2
  195.     SKIP -1
  196.     IF BOF() OR RECNO() = m.toprec
  197.         GO TOP
  198.         SHOW GET m.choice, 2 DISABLE
  199.         SHOW GET m.choice, 1 DISABLE
  200.     ELSE
  201.         IF RECNO() < m.bottomrec
  202.             SHOW GET m.choice, 3 ENABLE
  203.             SHOW GET m.choice, 4 ENABLE
  204.         ENDIF
  205.     ENDIF    
  206. CASE m.choice = 3
  207.     SKIP 1
  208.     IF EOF() OR RECNO() = m.bottomrec
  209.         GO BOTTOM
  210.         SHOW GET m.choice, 3 DISABLE
  211.         SHOW GET m.choice, 4 DISABLE
  212.     ELSE
  213.         IF RECNO() > m.toprec
  214.             SHOW GET m.choice, 2 ENABLE
  215.             SHOW GET m.choice, 1 ENABLE
  216.         ENDIF
  217.     ENDIF
  218. CASE m.choice = 4
  219.     GO BOTTOM
  220.     SHOW GET m.choice, 3 DISABLE
  221.     SHOW GET m.choice, 2 ENABLE
  222.     SHOW GET m.choice, 1 ENABLE
  223.     SHOW GET m.choice, 4 DISABLE
  224. ENDCASE
  225. SHOW GETS
  226.  
  227. *       *********************************************************
  228. *       *                                                         
  229. *       * _QR10N5WGI           m.lchoice VALID                    
  230. *       *                                                         
  231. *       * Function Origin:                                        
  232. *       *                                                         
  233. *       * From Platform:       Windows                            
  234. *       * From Screen:         CONTROL,     Record Number:    3   
  235. *       * Variable:            m.lchoice                          
  236. *       * Called By:           VALID Clause                       
  237. *       * Object Type:         Push Button                        
  238. *       * Snippet Number:      2                                  
  239. *       *                                                         
  240. *       *********************************************************
  241. *
  242. FUNCTION _qr10n5wgi     &&  m.lchoice VALID
  243. #REGION 1
  244. DO SEARCHVAR2 IN SEARCH.PRG
  245.  
  246.  
  247. *       *********************************************************
  248. *       *                                                         
  249. *       * _QR10N5WKI           m.echoice VALID                    
  250. *       *                                                         
  251. *       * Function Origin:                                        
  252. *       *                                                         
  253. *       * From Platform:       Windows                            
  254. *       * From Screen:         CONTROL,     Record Number:    4   
  255. *       * Variable:            m.echoice                          
  256. *       * Called By:           VALID Clause                       
  257. *       * Object Type:         Push Button                        
  258. *       * Snippet Number:      3                                  
  259. *       *                                                         
  260. *       *********************************************************
  261. *
  262. FUNCTION _qr10n5wki     &&  m.echoice VALID
  263. #REGION 1
  264. m.idlequit = .T.    
  265. m.quitting = .T.
  266. CLEAR READ ALL
  267.